package com.neusoft.elmboot.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

@Configuration
public class UploadConfiguration extends WebMvcConfigurationSupport {
    @Override
    protected void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/**")//这个将应用到url中
                .addResourceLocations("file:/var/elm/");//这里填的是图片的绝对父路径
        super.addResourceHandlers(registry);
    }
}
